refactor: route features through command module#156
refactor: route features through command module#156ndycode wants to merge 1 commit intorefactor/pr1-remove-inline-status-wrapperfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
lib/codex-manager.tsfeaturescommand directly through the extracted command moduleWhat Changed
runFeaturesReport()wrapperfeaturesdispatch path to callrunFeaturesCommand(...)directly with the existing feature matrixValidation
npm run test -- test/codex-manager-status-command.test.ts test/codex-manager-switch-command.test.ts test/codex-manager-check-command.test.ts test/codex-manager-report-command.test.ts test/codex-manager-cli.test.tsnpm run lintnpm run typechecknpm run buildRisk and Rollback
f29cf31to restore the inline features wrapperAdditional Notes
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
this pr removes the redundant
runFeaturesReport()one-liner wrapper inlib/codex-manager.tsand callsrunFeaturesCommand({ implementedFeatures: IMPLEMENTED_FEATURES })directly at the dispatch site. behavior is unchanged — it's a pure noise-reduction refactor that brings thefeaturesdispatch in line with how other extracted commands (check,status,report) are already wired.runFeaturesReport()deleted — it was a one-liner with no added value.runFeaturesCommand(...)directly with the existingIMPLEMENTED_FEATURESconstant.test/codex-manager-status-command.test.ts(runFeaturesCommandisolated with a mock list).test/codex-manager-cli.test.ts(full dispatch path, verifies 41-feature count and last feature name).runFeaturesCommandlives inlib/codex-manager/commands/status.tsalongsiderunStatusCommand, unlike the pattern where each command gets its own file (check.ts,report.ts,switch.ts). this pr doesn't introduce that gap, but a follow-upfeatures.tsextraction would complete the pattern.Confidence Score: 5/5
return runFeaturesCommand({ implementedFeatures: IMPLEMENTED_FEATURES })). the call site now does the same thing directly. both the extracted function and the full cli dispatch path are covered by existing vitest suites.Important Files Changed
runFeaturesReport()wrapper and callsrunFeaturesCommand({ implementedFeatures: IMPLEMENTED_FEATURES })directly at the dispatch site — behavior is identical, both the unit test incodex-manager-status-command.test.tsand the integration test incodex-manager-cli.test.ts(lines 916–930) cover the path.Sequence Diagram
sequenceDiagram participant CLI as runCodexMultiAuthCli participant OLD as runFeaturesReport (deleted) participant CMD as runFeaturesCommand note over CLI,OLD: before this PR CLI->>OLD: command === "features" OLD->>CMD: runFeaturesCommand({ implementedFeatures }) CMD-->>OLD: 0 OLD-->>CLI: 0 note over CLI,CMD: after this PR CLI->>CMD: command === "features" → runFeaturesCommand({ implementedFeatures }) CMD-->>CLI: 0Last reviewed commit: "refactor: route feat..."